package com.boe.csb.core.common.utils;

import com.boe.csb.core.common.CsbConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by tianjin.lp on 16/12/7.
 */
public class MobileMsgSender {
	
	private static final Logger logger = LoggerFactory.getLogger(MobileMsgSender.class);
	
	private static IMobileMsgSender sender;

	static{
		if(CsbConstants.MOBILE_SEND_IMPL.equals("boe")){//使用boe的短信平台
			logger.info("----user boe ws mobile platform----");
			sender = BoeMobileWSMsgSender.getInstance();
		}else{//使用数心的测试短信接口
			logger.info("----user aliyun test platform------");
			sender = AliyunMobileMsgSender.getInstance();
		}
	}
	
	/**
	 * 发送注册短信验证码
	 * @param code
	 * @return
	 */
	public static boolean sendRegVerifyCode(String code, String recNum){
		return sender.sendRegVerifyCode(code, recNum);
	}


}
